using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class Payment : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
   
    protected void reclear() 
    {
        tbDate.Text = "";
        tbCredit.Text = "";
        tbCheck.Text = "";
        tbDebit.Text = "";
        tbCash.Text = "";
    }

    protected void BtnClaim_Click(object sender, EventArgs e)
    {
        string sql = "Data Source=WWW-5EE1A3BA688;Initial Catalog=EventCal;Integrated Security=True";
        string sqlTxt = "Insert into Ex_claim values('" +tbDate.Text+"','"+tbCheck.Text+"','"+tbCredit.Text+"','"+tbDebit.Text+"','"+tbCash.Text+"')";
        SqlConnection conn = new SqlConnection(sql);
        SqlCommand cmd;
        try
        {
            conn.Open();
            cmd = new SqlCommand(sqlTxt, conn);
            cmd.ExecuteNonQuery();
            reclear();
          

        }
        catch (SqlException)
        {
            reclear();
        }
        finally
        {
            conn.Close();
        }
    }
}
